<div class="search-box">
	<form class="search_form layui-form" lay-filter="baojia_search_form">
		<div class="layui-inline">
			<label class="layui-form-label">产品类型</label>
			<div class="layui-input-inline">
				<select name="goods_type" lay-filter="goods_type" id="goods_type" lay-search>
					<option value="">全部</option>
					<option value="自选库">自选库</option>
					<option value="重点库">重点库</option>
				</select>
			</div>
		</div> 
		<div class="layui-inline">
			<label class="layui-form-label">审核状态</label>
			<div class="layui-input-inline">
				<select name="audit_state" lay-filter="audit_state" id="audit_state" lay-search>
					<option value="">全部</option>
					<option value="1">审核通过</option>
					<option value="2">等待审核</option>
					<option value="3">驳回审核</option>
				</select>
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">字母编号</label>
			<div class="layui-input-inline">
				<input type="text" name="goods_sku" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">数字编号</label>
			<div class="layui-input-inline">
				<input type="text" name="goods_shuzi" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">商品名称</label>
			<div class="layui-input-inline">
				<input type="text" name="goods_name" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">供应商</label>
			<div class="layui-input-inline">
				<input type="text" name="apply_member" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">审核人</label>
			<div class="layui-input-inline">
				<input type="text" name="audit_member" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label layui-bg-blue">业务员</label>
			<div class="layui-input-inline">
				<input type="text" name="beizhu" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<input type="text" name="min_create_time" autocomplete="off" class="layui-input" placeholder="申请日期">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="max_create_time" autocomplete="off" class="layui-input" placeholder="申请日期">
			</div>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<input type="text" name="min_audit_time" autocomplete="off" class="layui-input" placeholder="审核日期">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="max_audit_time" autocomplete="off" class="layui-input" placeholder="审核日期">
			</div>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<input type="text" name="min_zhouqi_time" autocomplete="off" class="layui-input" placeholder="报价期限">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="max_zhouqi_time" autocomplete="off" class="layui-input" placeholder="报价期限">
			</div>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<button type="button" id="order_search_btn"
					class="layui-btn layui-btn-normal layui-btn-sm layui-bg-red">搜 索</button>
			</div>
		</div>
		<div class="pack-up"></div>
	</form>
</div>
<table class="layui-hide" id="baojia_list" lay-filter="baojia_list"></table>
<script>
	var baojia_list_url = "{:url('baojia/ajaxList')}";
	var baojia_delete_url = "{:url('baojia/ajaxDelete')}";
	var baojia_save_url = "{:url('baojia/saveData')}";
	var baojia_pass_url = "{:url('baojia/pass')}";
	var baojia_refuse_url = "{:url('baojia/refuse')}";
	var baojia_all_pass_url = "{:url('baojia/allPass')}";
	var baojia_all_refuse_url = "{:url('baojia/allRefuse')}";
	var baojia_edit_url = "{:url('baojia/edit')}";
	var baojia_cols = {$cols};
	var export_url = "{:url('baojia/export')}";
	var baojia_edit_url = "{:url('baojia/edit')}";
	var update_zhenshi_url = "{:url('baojia/updateZhenshi')}";
</script>
<script type="text/html" id="baojiaToolbar">
	<div class="layui-btn-container">
		<a type="button" data-title="导出本次查询" data-url="{:url('baojia/export')}"
			class="layui-btn layui-btn-warm layui-btn-sm" lay-event="exportAllBaojia"><i
				class="layui-icon layui-icon-spread-left"></i>导出本次查询</a>
				{if condition="menuAuth('good_price_sh')"}
		<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="allPass"><i class="layui-icon layui-icon-component"></i>批量通过</button>
		<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="allReject"><i class="layui-icon layui-icon-component"></i>批量驳回</button>
		{/if}
	</div>
</script>
<script type="text/html" id="baojia_tool">
	{if condition="menuAuth('good_list_price_sh')"}
	<div class="layui-btn-group">
		{{# if(d.audit_state == 2){}}
			<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="pass" data-id="{{ d.audit_id}}"
				data-title="通过"><i class="layui-icon layui-icon-ok"></i></a>
			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="refuse" data-id="{{ d.audit_id}}"
				data-title="拒绝"><i class="layui-icon layui-icon-close"></i></a>
			{{#}}}
	</div>
	{/if}
</script>
<script type="text/html" id="audit_stateTpl">
{{# if(d.audit_state == 1){}}
	<div class="layui-anim circle layui-bg-blue" data-title="通过">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else if(d.audit_state == 2){ }}
		<div class="layui-anim circle layui-bg-orange" data-title="等待">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
		{{# } else {}}
			<div class="layui-anim circle layui-bg-red" data-title="驳回">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# }}}
</script>
<script type="text/html" id="apply_member_idTpl">
{{#
		return "<div title='"+d.users.realname+"'>"+d.users.supplier_name+"</div>";
	}}
</script>
<script type="text/html" id="audit_member_idTpl">
{{#
		if(d.admins){
			return d.admins.realname;
		} else {
			return '';
		}
	}}
</script>
<script src="/static/js/baojia/index.js" type="text/javascript" charset="utf-8"></script>
